package com.atxiaodei.kabudashejimoshi.责任链模式.使用建造者优化责任链模式;

import com.atxiaodei.kabudashejimoshi.责任链模式.Member;


public class MemberService {

    public void login(String loginName,String loginPass){

        Handler.Builder builder = new Handler.Builder();

        builder.addHandler(new ValidateHandler())
                .addHandler(new LoginHandler())
                .addHandler(new AuthHandler());

        builder.build().doHandle(new Member(loginName,loginPass));

    }
}